package com.eh.adapter.duckSimulator.Kind.impl;

import com.eh.adapter.duckSimulator.Kind.Duck;
import com.eh.adapter.duckSimulator.Kind.Turkey;

/**
 * Created by David on 2016/4/30.
 */
public class DuckAdapter implements Duck {
    private Turkey turkey;

    public DuckAdapter(Turkey turkey) {
        this.turkey = turkey;
    }

    @Override
    public void quack() {
        turkey.gobble();
    }

    @Override
    public void fly() {
        turkey.fly();
    }
}
